package com.monkeyboy.second.aqs;

import java.util.concurrent.CountDownLatch;
import java.util.concurrent.CyclicBarrier;
import java.util.concurrent.Semaphore;
import java.util.concurrent.locks.ReentrantLock;

/**
 * 描述：     TODO
 */
public class AQSDemo {

    public static void main(String[] args) {
        new Semaphore(5,false);//支持公平和非公平
        new CountDownLatch(4);//只支持非公平锁，源码里面只实现了aqs的tryAcquireShared和tryReleaseShared方法
        new ReentrantLock();//支持公平和非公平
        new CyclicBarrier(4);
    }
}
